<?php
class ConfigFactory {
	
	private static $_instance;
	
	public static function getInstance() {
		if(is_null(self::$_instance)){
			self::$_instance = new ConfigFactory();
		}
		return self::$_instance;
	}
	
	
	public function getConfig()
	{
		return Zend_Registry::get("config");	
	}
	
	
	public function get($key, $namespace="config")
	{
		//TODO : use zend_session to store config object array
		$config = Zend_Registry::get($namespace);
		
		$res = $config->get($key,null);
		
		return $res;
	}
	
}